# -*- coding:utf-8 -*-
import os
import sys


def getRealPath(file_name):
    config_name = file_name
    application_path = ''
    # determine if application is a script file or frozen exe
    if getattr(sys, 'frozen', False):
        application_path = os.path.dirname(sys.executable)
    elif __file__:
        application_path = os.path.dirname(__file__)

    config_path = os.path.join(application_path, config_name)
    print(config_path)

getRealPath('WebConfig.ini')